Integrand size = 35, antiderivative size = 99 \[ \int \frac {a+b x^2+c x^4}{x^3 \sqrt {d-e x} \sqrt {d+e x}} \, dx=-\frac {c \sqrt {d-e x} \sqrt {d+e x}}{e^2}-\frac {a \sqrt {d-e x} \sqrt {d+e x}}{2 d^2 x^2}-\frac {\left (2 b d^2+a e^2\right ) \text {arctanh}\left (\frac {\sqrt {d-e x} \sqrt {d+e x}}{d}\right )}{2 d^3} \]
-1/2*(a*e^2+2*b*d^2)*arctanh((-e*x+d)^(1/2)*(e*x+d)^(1/2)/d)/d^3-c*(-e*x+d )^(1/2)*(e*x+d)^(1/2)/e^2-1/2*a*(-e*x+d)^(1/2)*(e*x+d)^(1/2)/d^2/x^2
Time = 0.28 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.86 \[ \int \frac {a+b x^2+c x^4}{x^3 \sqrt {d-e x} \sqrt {d+e x}} \, dx=-\frac {\frac {\sqrt {d-e x} \sqrt {d+e x} \left (a d e^2+2 c d^3 x^2\right )}{e^2 x^2}+2 \left (2 b d^2+a e^2\right ) \text {arctanh}\left (\frac {\sqrt {d+e x}}{\sqrt {d-e x}}\right )}{2 d^3} \]
-1/2*((Sqrt[d - e*x]*Sqrt[d + e*x]*(a*d*e^2 + 2*c*d^3*x^2))/(e^2*x^2) + 2* (2*b*d^2 + a*e^2)*ArcTanh[Sqrt[d + e*x]/Sqrt[d - e*x]])/d^3
Time = 0.37 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.51, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {1905, 1578, 1192, 1471, 25, 299, 219}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {a+b x^2+c x^4}{x^3 \sqrt {d-e x} \sqrt {d+e x}} \, dx\) |
\(\Big \downarrow \) 1905 |
\(\displaystyle \frac {\sqrt {d^2-e^2 x^2} \int \frac {c x^4+b x^2+a}{x^3 \sqrt {d^2-e^2 x^2}}dx}{\sqrt {d-e x} \sqrt {d+e x}}\) |
\(\Big \downarrow \) 1578 |
\(\displaystyle \frac {\sqrt {d^2-e^2 x^2} \int \frac {c x^4+b x^2+a}{x^4 \sqrt {d^2-e^2 x^2}}dx^2}{2 \sqrt {d-e x} \sqrt {d+e x}}\) |
\(\Big \downarrow \) 1192 |
\(\displaystyle -\frac {\sqrt {d^2-e^2 x^2} \int \frac {c x^8-\left (2 c d^2+b e^2\right ) x^4+c d^4+a e^4+b d^2 e^2}{\left (d^2-x^4\right )^2}d\sqrt {d^2-e^2 x^2}}{e^2 \sqrt {d-e x} \sqrt {d+e x}}\) |
\(\Big \downarrow \) 1471 |
\(\displaystyle -\frac {\sqrt {d^2-e^2 x^2} \left (\frac {a e^4 \sqrt {d^2-e^2 x^2}}{2 d^2 \left (d^2-x^4\right )}-\frac {\int -\frac {2 c d^4-2 c x^4 d^2+2 b e^2 d^2+a e^4}{d^2-x^4}d\sqrt {d^2-e^2 x^2}}{2 d^2}\right )}{e^2 \sqrt {d-e x} \sqrt {d+e x}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\sqrt {d^2-e^2 x^2} \left (\frac {\int \frac {2 c d^4-2 c x^4 d^2+2 b e^2 d^2+a e^4}{d^2-x^4}d\sqrt {d^2-e^2 x^2}}{2 d^2}+\frac {a e^4 \sqrt {d^2-e^2 x^2}}{2 d^2 \left (d^2-x^4\right )}\right )}{e^2 \sqrt {d-e x} \sqrt {d+e x}}\) |
\(\Big \downarrow \) 299 |
\(\displaystyle -\frac {\sqrt {d^2-e^2 x^2} \left (\frac {e^2 \left (a e^2+2 b d^2\right ) \int \frac {1}{d^2-x^4}d\sqrt {d^2-e^2 x^2}+2 c d^2 \sqrt {d^2-e^2 x^2}}{2 d^2}+\frac {a e^4 \sqrt {d^2-e^2 x^2}}{2 d^2 \left (d^2-x^4\right )}\right )}{e^2 \sqrt {d-e x} \sqrt {d+e x}}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {\sqrt {d^2-e^2 x^2} \left (\frac {\frac {e^2 \left (a e^2+2 b d^2\right ) \text {arctanh}\left (\frac {\sqrt {d^2-e^2 x^2}}{d}\right )}{d}+2 c d^2 \sqrt {d^2-e^2 x^2}}{2 d^2}+\frac {a e^4 \sqrt {d^2-e^2 x^2}}{2 d^2 \left (d^2-x^4\right )}\right )}{e^2 \sqrt {d-e x} \sqrt {d+e x}}\) |
-((Sqrt[d^2 - e^2*x^2]*((a*e^4*Sqrt[d^2 - e^2*x^2])/(2*d^2*(d^2 - x^4)) + (2*c*d^2*Sqrt[d^2 - e^2*x^2] + (e^2*(2*b*d^2 + a*e^2)*ArcTanh[Sqrt[d^2 - e ^2*x^2]/d])/d)/(2*d^2)))/(e^2*Sqrt[d - e*x]*Sqrt[d + e*x]))
3.2.36.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2), x_Symbol] :> Simp[d*x *((a + b*x^2)^(p + 1)/(b*(2*p + 3))), x] - Simp[(a*d - b*c*(2*p + 3))/(b*(2 *p + 3)) Int[(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && NeQ[2*p + 3, 0]
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[2/e^(n + 2*p + 1) Subst[Int[x^( 2*m + 1)*(e*f - d*g + g*x^2)^n*(c*d^2 - b*d*e + a*e^2 - (2*c*d - b*e)*x^2 + c*x^4)^p, x], x, Sqrt[d + e*x]], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && IGtQ[p, 0] && ILtQ[n, 0] && IntegerQ[m + 1/2]
Int[((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> With[{Qx = PolynomialQuotient[(a + b*x^2 + c*x^4)^p, d + e*x^2 , x], R = Coeff[PolynomialRemainder[(a + b*x^2 + c*x^4)^p, d + e*x^2, x], x , 0]}, Simp[(-R)*x*((d + e*x^2)^(q + 1)/(2*d*(q + 1))), x] + Simp[1/(2*d*(q + 1)) Int[(d + e*x^2)^(q + 1)*ExpandToSum[2*d*(q + 1)*Qx + R*(2*q + 3), x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^ 2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] && LtQ[q, -1]
Int[(x_)^(m_.)*((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_ )^4)^(p_.), x_Symbol] :> Simp[1/2 Subst[Int[x^((m - 1)/2)*(d + e*x)^q*(a + b*x + c*x^2)^p, x], x, x^2], x] /; FreeQ[{a, b, c, d, e, p, q}, x] && Int egerQ[(m - 1)/2]
Int[((f_.)*(x_))^(m_.)*((d1_) + (e1_.)*(x_)^(non2_.))^(q_.)*((d2_) + (e2_.) *(x_)^(non2_.))^(q_.)*((a_.) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_))^(p_.), x _Symbol] :> Simp[(d1 + e1*x^(n/2))^FracPart[q]*((d2 + e2*x^(n/2))^FracPart[ q]/(d1*d2 + e1*e2*x^n)^FracPart[q]) Int[(f*x)^m*(d1*d2 + e1*e2*x^n)^q*(a + b*x^n + c*x^(2*n))^p, x], x] /; FreeQ[{a, b, c, d1, e1, d2, e2, f, n, p, q}, x] && EqQ[n2, 2*n] && EqQ[non2, n/2] && EqQ[d2*e1 + d1*e2, 0]
Time = 0.43 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.38
method | result | size |
risch | \(-\frac {a \sqrt {-e x +d}\, \sqrt {e x +d}}{2 d^{2} x^{2}}+\frac {\left (-\frac {2 c \,d^{2} \sqrt {-\left (e x -d \right ) \left (e x +d \right )}}{e^{2}}-\frac {\left (a \,e^{2}+2 b \,d^{2}\right ) \ln \left (\frac {2 d^{2}+2 \sqrt {d^{2}}\, \sqrt {-e^{2} x^{2}+d^{2}}}{x}\right )}{\sqrt {d^{2}}}\right ) \sqrt {\left (e x +d \right ) \left (-e x +d \right )}}{2 d^{2} \sqrt {e x +d}\, \sqrt {-e x +d}}\) | \(137\) |
default | \(-\frac {\sqrt {-e x +d}\, \sqrt {e x +d}\, \left (2 \,\operatorname {csgn}\left (d \right ) c \,d^{3} x^{2} \sqrt {-e^{2} x^{2}+d^{2}}+\ln \left (\frac {2 d \left (\sqrt {-e^{2} x^{2}+d^{2}}\, \operatorname {csgn}\left (d \right )+d \right )}{x}\right ) a \,e^{4} x^{2}+2 \ln \left (\frac {2 d \left (\sqrt {-e^{2} x^{2}+d^{2}}\, \operatorname {csgn}\left (d \right )+d \right )}{x}\right ) b \,d^{2} e^{2} x^{2}+\operatorname {csgn}\left (d \right ) a d \,e^{2} \sqrt {-e^{2} x^{2}+d^{2}}\right ) \operatorname {csgn}\left (d \right )}{2 d^{3} \sqrt {-e^{2} x^{2}+d^{2}}\, x^{2} e^{2}}\) | \(163\) |
-1/2*a*(-e*x+d)^(1/2)*(e*x+d)^(1/2)/d^2/x^2+1/2/d^2*(-2*c*d^2/e^2*(-(e*x-d )*(e*x+d))^(1/2)-(a*e^2+2*b*d^2)/(d^2)^(1/2)*ln((2*d^2+2*(d^2)^(1/2)*(-e^2 *x^2+d^2)^(1/2))/x))*((e*x+d)*(-e*x+d))^(1/2)/(e*x+d)^(1/2)/(-e*x+d)^(1/2)
Time = 0.27 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.99 \[ \int \frac {a+b x^2+c x^4}{x^3 \sqrt {d-e x} \sqrt {d+e x}} \, dx=-\frac {2 \, c d^{4} x^{2} - {\left (2 \, b d^{2} e^{2} + a e^{4}\right )} x^{2} \log \left (\frac {\sqrt {e x + d} \sqrt {-e x + d} - d}{x}\right ) + {\left (2 \, c d^{3} x^{2} + a d e^{2}\right )} \sqrt {e x + d} \sqrt {-e x + d}}{2 \, d^{3} e^{2} x^{2}} \]
-1/2*(2*c*d^4*x^2 - (2*b*d^2*e^2 + a*e^4)*x^2*log((sqrt(e*x + d)*sqrt(-e*x + d) - d)/x) + (2*c*d^3*x^2 + a*d*e^2)*sqrt(e*x + d)*sqrt(-e*x + d))/(d^3 *e^2*x^2)
Timed out. \[ \int \frac {a+b x^2+c x^4}{x^3 \sqrt {d-e x} \sqrt {d+e x}} \, dx=\text {Timed out} \]
Time = 0.28 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.24 \[ \int \frac {a+b x^2+c x^4}{x^3 \sqrt {d-e x} \sqrt {d+e x}} \, dx=-\frac {b \log \left (\frac {2 \, d^{2}}{{\left | x \right |}} + \frac {2 \, \sqrt {-e^{2} x^{2} + d^{2}} d}{{\left | x \right |}}\right )}{d} - \frac {a e^{2} \log \left (\frac {2 \, d^{2}}{{\left | x \right |}} + \frac {2 \, \sqrt {-e^{2} x^{2} + d^{2}} d}{{\left | x \right |}}\right )}{2 \, d^{3}} - \frac {\sqrt {-e^{2} x^{2} + d^{2}} c}{e^{2}} - \frac {\sqrt {-e^{2} x^{2} + d^{2}} a}{2 \, d^{2} x^{2}} \]
-b*log(2*d^2/abs(x) + 2*sqrt(-e^2*x^2 + d^2)*d/abs(x))/d - 1/2*a*e^2*log(2 *d^2/abs(x) + 2*sqrt(-e^2*x^2 + d^2)*d/abs(x))/d^3 - sqrt(-e^2*x^2 + d^2)* c/e^2 - 1/2*sqrt(-e^2*x^2 + d^2)*a/(d^2*x^2)
Leaf count of result is larger than twice the leaf count of optimal. 374 vs. \(2 (83) = 166\).
Time = 0.46 (sec) , antiderivative size = 374, normalized size of antiderivative = 3.78 \[ \int \frac {a+b x^2+c x^4}{x^3 \sqrt {d-e x} \sqrt {d+e x}} \, dx=-\frac {2 \, \sqrt {e x + d} \sqrt {-e x + d} c + \frac {{\left (2 \, b d^{2} e^{2} + a e^{4}\right )} \log \left ({\left | -\frac {\sqrt {2} \sqrt {d} - \sqrt {-e x + d}}{\sqrt {e x + d}} + \frac {\sqrt {e x + d}}{\sqrt {2} \sqrt {d} - \sqrt {-e x + d}} + 2 \right |}\right )}{d^{3}} - \frac {{\left (2 \, b d^{2} e^{2} + a e^{4}\right )} \log \left ({\left | -\frac {\sqrt {2} \sqrt {d} - \sqrt {-e x + d}}{\sqrt {e x + d}} + \frac {\sqrt {e x + d}}{\sqrt {2} \sqrt {d} - \sqrt {-e x + d}} - 2 \right |}\right )}{d^{3}} - \frac {4 \, {\left (a e^{4} {\left (\frac {\sqrt {2} \sqrt {d} - \sqrt {-e x + d}}{\sqrt {e x + d}} - \frac {\sqrt {e x + d}}{\sqrt {2} \sqrt {d} - \sqrt {-e x + d}}\right )}^{3} + 4 \, a e^{4} {\left (\frac {\sqrt {2} \sqrt {d} - \sqrt {-e x + d}}{\sqrt {e x + d}} - \frac {\sqrt {e x + d}}{\sqrt {2} \sqrt {d} - \sqrt {-e x + d}}\right )}\right )}}{{\left ({\left (\frac {\sqrt {2} \sqrt {d} - \sqrt {-e x + d}}{\sqrt {e x + d}} - \frac {\sqrt {e x + d}}{\sqrt {2} \sqrt {d} - \sqrt {-e x + d}}\right )}^{2} - 4\right )}^{2} d^{3}}}{2 \, e^{2}} \]
-1/2*(2*sqrt(e*x + d)*sqrt(-e*x + d)*c + (2*b*d^2*e^2 + a*e^4)*log(abs(-(s qrt(2)*sqrt(d) - sqrt(-e*x + d))/sqrt(e*x + d) + sqrt(e*x + d)/(sqrt(2)*sq rt(d) - sqrt(-e*x + d)) + 2))/d^3 - (2*b*d^2*e^2 + a*e^4)*log(abs(-(sqrt(2 )*sqrt(d) - sqrt(-e*x + d))/sqrt(e*x + d) + sqrt(e*x + d)/(sqrt(2)*sqrt(d) - sqrt(-e*x + d)) - 2))/d^3 - 4*(a*e^4*((sqrt(2)*sqrt(d) - sqrt(-e*x + d) )/sqrt(e*x + d) - sqrt(e*x + d)/(sqrt(2)*sqrt(d) - sqrt(-e*x + d)))^3 + 4* a*e^4*((sqrt(2)*sqrt(d) - sqrt(-e*x + d))/sqrt(e*x + d) - sqrt(e*x + d)/(s qrt(2)*sqrt(d) - sqrt(-e*x + d))))/((((sqrt(2)*sqrt(d) - sqrt(-e*x + d))/s qrt(e*x + d) - sqrt(e*x + d)/(sqrt(2)*sqrt(d) - sqrt(-e*x + d)))^2 - 4)^2* d^3))/e^2
Time = 10.86 (sec) , antiderivative size = 422, normalized size of antiderivative = 4.26 \[ \int \frac {a+b x^2+c x^4}{x^3 \sqrt {d-e x} \sqrt {d+e x}} \, dx=\frac {b\,\left (\ln \left (\frac {{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^2}{{\left (\sqrt {d-e\,x}-\sqrt {d}\right )}^2}-1\right )-\ln \left (\frac {\sqrt {d+e\,x}-\sqrt {d}}{\sqrt {d-e\,x}-\sqrt {d}}\right )\right )}{d}-\frac {\left (\frac {c\,d}{e^2}+\frac {c\,x}{e}\right )\,\sqrt {d-e\,x}}{\sqrt {d+e\,x}}-\frac {\frac {a\,e^2\,{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^2}{{\left (\sqrt {d-e\,x}-\sqrt {d}\right )}^2}-\frac {a\,e^2}{2}+\frac {15\,a\,e^2\,{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^4}{2\,{\left (\sqrt {d-e\,x}-\sqrt {d}\right )}^4}}{\frac {16\,d^3\,{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^2}{{\left (\sqrt {d-e\,x}-\sqrt {d}\right )}^2}-\frac {32\,d^3\,{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^4}{{\left (\sqrt {d-e\,x}-\sqrt {d}\right )}^4}+\frac {16\,d^3\,{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^6}{{\left (\sqrt {d-e\,x}-\sqrt {d}\right )}^6}}-\frac {a\,e^2\,\ln \left (\frac {\sqrt {d+e\,x}-\sqrt {d}}{\sqrt {d-e\,x}-\sqrt {d}}\right )}{2\,d^3}+\frac {a\,e^2\,\ln \left (\frac {{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^2}{{\left (\sqrt {d-e\,x}-\sqrt {d}\right )}^2}-1\right )}{2\,d^3}+\frac {a\,e^2\,{\left (\sqrt {d+e\,x}-\sqrt {d}\right )}^2}{32\,d^3\,{\left (\sqrt {d-e\,x}-\sqrt {d}\right )}^2} \]
(b*(log(((d + e*x)^(1/2) - d^(1/2))^2/((d - e*x)^(1/2) - d^(1/2))^2 - 1) - log(((d + e*x)^(1/2) - d^(1/2))/((d - e*x)^(1/2) - d^(1/2)))))/d - (((c*d )/e^2 + (c*x)/e)*(d - e*x)^(1/2))/(d + e*x)^(1/2) - ((a*e^2*((d + e*x)^(1/ 2) - d^(1/2))^2)/((d - e*x)^(1/2) - d^(1/2))^2 - (a*e^2)/2 + (15*a*e^2*((d + e*x)^(1/2) - d^(1/2))^4)/(2*((d - e*x)^(1/2) - d^(1/2))^4))/((16*d^3*(( d + e*x)^(1/2) - d^(1/2))^2)/((d - e*x)^(1/2) - d^(1/2))^2 - (32*d^3*((d + e*x)^(1/2) - d^(1/2))^4)/((d - e*x)^(1/2) - d^(1/2))^4 + (16*d^3*((d + e* x)^(1/2) - d^(1/2))^6)/((d - e*x)^(1/2) - d^(1/2))^6) - (a*e^2*log(((d + e *x)^(1/2) - d^(1/2))/((d - e*x)^(1/2) - d^(1/2))))/(2*d^3) + (a*e^2*log((( d + e*x)^(1/2) - d^(1/2))^2/((d - e*x)^(1/2) - d^(1/2))^2 - 1))/(2*d^3) + (a*e^2*((d + e*x)^(1/2) - d^(1/2))^2)/(32*d^3*((d - e*x)^(1/2) - d^(1/2))^ 2)